﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Script.Serialization;

namespace SchemaMonitor.json
{
    public class CDebugTokens : List<CDebugToken>
    {
        //Constructor
        public CDebugTokens(string s) : this(new JavaScriptSerializer().Deserialize<Dictionary<string, object>>(s)) { }
        public CDebugTokens(dynamic jsonDict) : this((Dictionary<string, object>)jsonDict) { }
        public CDebugTokens(Dictionary<string, object> d) : this(CDict.GetObjArr("data", d)) { }
        public CDebugTokens(object[] array) : base((array).Length)
        {
            foreach (var i in array)
                Add(new CDebugToken(i));
        }
    }
}
